Skip to content

Disable optional S3 checksum headers#218

Merged
ruibaby merged 1 commit into
mainfrom
fix/disable-optional-s3-checksums
Jun 24, 2026
Merged

Disable optional S3 checksum headers#218
ruibaby merged 1 commit into
mainfrom
fix/disable-optional-s3-checksums

Conversation

@ruibaby

@ruibaby ruibaby commented Jun 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Configure the S3 client to use RequestChecksumCalculation.WHEN_REQUIRED
  • Keep presigned URL generation unchanged
  • Add a regression test that verifies uploadPart no longer sends optional SDK checksum headers

Rationale

AWS SDK for Java v2 can send flexible checksum headers such as x-amz-sdk-checksum-algorithm and x-amz-checksum-crc32 for multipart uploads. Some S3-compatible services reject those optional headers, causing otherwise valid uploads to fail.

Testing

  • ./gradlew test --tests run.halo.s3os.S3OsAttachmentHandlerTest
  • ./gradlew test
  • git diff --check

@ruibaby ruibaby marked this pull request as ready for review June 21, 2026 15:20
@ruibaby ruibaby merged commit ef357d6 into main Jun 24, 2026
1 check passed
@ruibaby ruibaby deleted the fix/disable-optional-s3-checksums branch June 24, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant